package com.micro.ai.auth.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 用户更新请求DTO
 * 
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@Schema(description = "用户更新请求")
public class UserUpdateRequest {

    @Schema(description = "显示名称（可选，最多50个字符）", example = "John Doe")
    @Size(max = 50, message = "显示名称长度不能超过50个字符")
    private String displayName;

    @Schema(description = "邮箱（可选）", example = "john@example.com")
    @Email(message = "邮箱格式不正确")
    private String email;

    @Schema(description = "手机号（可选，11位中国大陆手机号）", example = "13800138000")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;

    @Schema(description = "头像URL（可选，最多500个字符）", example = "https://example.com/avatar.jpg")
    @Size(max = 500, message = "头像URL长度不能超过500个字符")
    private String avatarUrl;

    @Schema(description = "性别（可选）：male-男, female-女, other-其他", example = "male", allowableValues = {"male", "female", "other"})
    @Pattern(regexp = "^(male|female|other)$", message = "性别只能是male、female或other")
    private String gender;

    @Schema(description = "语言（可选，最多10个字符）", example = "zh_CN")
    @Size(max = 10, message = "语言代码长度不能超过10个字符")
    private String locale;

    @Schema(description = "时区（可选，最多50个字符）", example = "Asia/Shanghai")
    @Size(max = 50, message = "时区长度不能超过50个字符")
    private String timezone;
}
